<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/tpl_admin.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Add file to package</title>
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="pack.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript" src="pack.js"></script>

<!-- InstanceParam name="sections_tab_class" type="text" value="tab" -->
<!-- InstanceParam name="packages_tab_class" type="text" value="tabsel" -->
<!-- InstanceParam name="users_tab_class" type="text" value="tab" -->
<!-- InstanceBeginEditable name="head" -->
<script language="JavaScript" type="text/JavaScript">
  function selectNew(){
    xfindObj('datafile').focus();
		xfindObj('description').disabled = false;
  }

  function selectSel(){
    xfindObj('selectedfile').focus();
		xfindObj('description').disabled = true;
  }
</script>
<!-- InstanceEndEditable -->
</head>
<body onLoad="showMessage(<%message_visible%>)">
<div id=headarea><%header_area%></div>
<div id=messagearea style="display: none">
  <div id=msgbutton><a href="#" onClick="show_hide_obj('messagearea');"><img src="close.gif" alt="Close" title="Close" border="0"></a></div>
  <div id=msgtext><%message_text%></div>
</div>
<div id=bodyarea style="clear: both">
<div id=adminarea>
<p class="page_header">Administration Panel</p>
<table width="685" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="90" class="tab" onMouseOver="this.bgColor='#D2E9FF';" onMouseOut="this.bgColor='#FFFFFF';">
<div align="center"><a href="?cmd=showsections&sid=<%sid%>" class="menu">Sections</a></div></td>
                <td width="10">&nbsp;</td>
                <td width="90" class="tabsel" onMouseOver="this.bgColor='#D2E9FF';" onMouseOut="this.bgColor='#FFFFFF';">
<div align="center"><a href="?cmd=showpacks&sid=<%sid%>" class="menu">Packages</a></div></td>
                <td width="10">&nbsp;</td>
                <td width="90" class="tab"  onMouseOver="this.bgColor='#D2E9FF';" onMouseOut="this.bgColor='#FFFFFF';">
<div align="center"><a href="?cmd=showusers&sid=<%sid%>" class="menu">Users</a></div></td>
                <td width="10">&nbsp;</td>
                <td>&nbsp;</td>
                <td width="10">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td bgcolor="#99CCFF" class="trcaption">
<div align="center" class="head"><!-- InstanceBeginEditable name="CaptionRegion" --><strong>Add file to package <%package_name%></strong><!-- InstanceEndEditable --></div></td>
        </tr>
        <tr>
          <td class="tdbody"><!-- InstanceBeginEditable name="BodyRegion" -->
            <form method="post" enctype="multipart/form-data" onsubmit="if (xfindObj('fileaction_new').checked){xfindObj('file_id').value=''}; return true;">
              <table width="100%" border="0" cellpadding="0" cellspacing="0" class="editpack">
                <tr>
				  <td width="20%"><input id="fileaction_sel" name="fileaction" type="radio" value="select" <%select_checked%> onclick="selectSel()"/>&nbsp;Select File</td>
                  <td width="80%" height="30">
				    <select id="selectedfile" name="selectedfile" title="Select File" size="1" style="width: 100%" onfocus="xfindObj('fileaction_sel').checked = true;">
                      <option <%none_selected%> value="0">none</option>
                      <%options_files%>
                    </select></td>
                </tr>
                <tr>
				  <td width="20%"><input id="fileaction_new" name="fileaction" type="radio" value="new" <%new_checked%> onclick="selectNew()"/>&nbsp;Upload File</td>
                  <td width="80%" height="30">
				    <input name="datafile" type="file" title="File name" id="datafile" style="width: 100%" value="<%file_name%>" onfocus="xfindObj('fileaction_new').checked = true;"/>
				  </td>
                </tr>
                <tr>
                  <td width="20%">Description</td>
                  <td width="80%" height="30"><input name="description" type="text" id="description" style="width: 100%" title="Description" value="<%name%>"/></td>
                </tr>
                <tr>
                  <td height="30" colspan="2">
                      <div align="center">
                      <input name="cmd" type="hidden" value="savefile" />
                      <input name="pack_id" type="hidden" value="<%pack_id%>"/>
                      <input id="file_id" name="file_id" type="hidden" value="<%file_id%>"/>
                      <input name="sid" type="hidden" value="<%sid%>" />
                      <input type="submit" class="button" value="Submit" />
                        <input name="Cancel" type="button" class="button" id="Cancel" value="Cancel" onclick="document.location='?cmd=packfiles&pack_id=<%pack_id%>&sid=<%sid%>'" />
                      </div></td>
                </tr>
              </table>
					  <script language="JavaScript" type="text/JavaScript">
						  <%if:select%>xfindObj('description').disabled=true;
							<%elseif:select%>xfindObj('description').disabled=false;
							<%endif:select%>
						</script>
              </form>
            <!-- InstanceEndEditable -->
</td>
        </tr>
      </table></td>
  </tr>
</table></div>
  </div>
</body>
<!-- InstanceEnd --></html>
